package com.keba.lamp.base.service.common.impl;


import com.keba.basic.base.service.impl.SuperServiceImpl;
import com.keba.lamp.base.entity.common.BaseParameter;
import com.keba.lamp.base.manager.common.BaseParameterManager;
import com.keba.lamp.base.service.common.BaseParameterService;
import com.keba.lamp.base.vo.save.common.BaseParameterSaveVO;
import com.keba.lamp.model.enumeration.system.DataTypeEnum;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * <p>
 * 业务实现类
 * 个性参数
 * </p>
 *
 * @author zuihou
 * @date 2021-11-08
 */
@Slf4j
@Service
@RequiredArgsConstructor
@Transactional(readOnly = true)

public class BaseParameterServiceImpl extends SuperServiceImpl<BaseParameterManager, Long, BaseParameter> implements BaseParameterService {
    @Override
    protected <SaveVO> BaseParameter saveBefore(SaveVO saveVO) {
        BaseParameterSaveVO baseParameterSaveVO = (BaseParameterSaveVO) saveVO;
        BaseParameter baseParameter = super.saveBefore(baseParameterSaveVO);
        baseParameter.setParamType(DataTypeEnum.SYSTEM.getCode());
        return baseParameter;
    }


}
